package com.game.mongo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by legend9999 on 2016/6/5.
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        UserMongo bean = ac.getBean(UserMongo.class);
        /*User user = new User();
        user.setUserId(bean.getNextUserId());
        user.getGameDataMap().put(1,new JinHuaGameData());
        bean.addUser(user);*/

        Map<String,Long> incMap = new HashMap<String, Long>();
        incMap.put(UserField.gameDataMap+".1."+UserField.JinHuaGameData.meili,1l);
        bean.incField(101104,incMap);
    }

}
